<?php
/********************************\
 * 框架核心文件: BaseModel.php
 * 功能：数据库的相关操作
 * 模型要继承本类才能连接数据库
 +-------------------------------
 * www.cnblogs.com/SmilingLiuWei
 * SmilingLiuWei@163.com
\********************************/

include_once('./Core/Smarty/Smarty.class.php');
class BaseController extends Smarty{
	public function redirect($url) {
		$str = $_SERVER['HTTP_HOST'].$url;
		$url=WebRoot.'/'.$url;
		if(!headers_sent())
			header('Location: '.$url);
		else
			echo '<meta http-equiv="Refresh" content="0;URL='.$url.'" />';
	}
}
